---
title: WorkflowRunOutput
sidebarTitle: WorkflowRunOutput & Events
---

## WorkflowRunOutput Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `content` | `Optional[Union[str, Dict[str, Any], List[Any], BaseModel, Any]]` | `None` | Main content/output from the workflow execution |
| `content_type` | `str` | `"str"` | Type of the content (e.g., "str", "json", etc.) |
| `workflow_id` | `Optional[str]` | `None` | Unique identifier of the executed workflow |
| `workflow_name` | `Optional[str]` | `None` | Name of the executed workflow |
| `run_id` | `Optional[str]` | `None` | Unique identifier for this specific run |
| `session_id` | `Optional[str]` | `None` | Session UUID associated with this run |
| `images` | `Optional[List[Image]]` | `None` | List of image artifacts generated |
| `videos` | `Optional[List[Video]]` | `None` | List of video artifacts generated |
| `audio` | `Optional[List[Audio]]` | `None` | List of audio artifacts generated |
| `response_audio` | `Optional[Audio]` | `None` | Audio response from the workflow |
| `step_results` | `List[Union[StepOutput, List[StepOutput]]]` | `[]` | Actual step execution results as StepOutput objects |
| `step_executor_runs` | `Optional[List[Union[RunOutput, TeamRunOutput]]]` | `None` | Store agent/team responses separately with parent_run_id references |
| `events` | `Optional[List[WorkflowRunOutputEvent]]` | `None` | Events captured during workflow execution |
| `metrics` | `Optional[WorkflowMetrics]` | `None` | Workflow metrics aggregated from all steps |
| `metadata` | `Optional[Dict[str, Any]]` | `None` | Additional metadata stored with the response |
| `created_at` | `int` | `int(time())` | Unix timestamp when the response was created |
| `status` | `RunStatus` | `RunStatus.pending` | Current status of the workflow run |

## WorkflowRunOutputEvent Types and Attributes

### BaseWorkflowRunOutputEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `created_at` | `int` | `int(time())` | Unix timestamp when the event was created |
| `event` | `str` | `""` | Type of the event (e.g., "WorkflowStarted") |
| `workflow_id` | `Optional[str]` | `None` | Unique identifier of the workflow |
| `workflow_name` | `Optional[str]` | `None` | Name of the workflow |
| `session_id` | `Optional[str]` | `None` | Session UUID associated with the workflow |
| `run_id` | `Optional[str]` | `None` | Unique identifier for the workflow run |
| `step_id` | `Optional[str]` | `None` | Unique identifier for the current step |
| `parent_step_id` | `Optional[str]` | `None` | Unique identifier for the parent step (for nested steps) |

### WorkflowStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.workflow_started.value` | Event type identifier |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### WorkflowCompletedEvent Attributes

<Snippet file="workflow-completed-event.mdx" />

### WorkflowCancelledEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.workflow_completed.value` | Event type identifier |
| `content` | `Optional[Any]` | `None` | Final output content from the workflow |
| `content_type` | `str` | `"str"` | Type of the content |
| `step_results` | `List[StepOutput]` | `[]` | List of all step execution results |
| `metadata` | `Optional[Dict[str, Any]]` | `None` | Additional metadata from workflow execution |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### StepStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.step_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the step being started |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the step |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### StepCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.step_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the step that completed |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the step |
| `content` | `Optional[Any]` | `None` | Content output from the step |
| `content_type` | `str` | `"str"` | Type of the content |
| `images` | `Optional[List[Image]]` | `None` | Image artifacts from the step |
| `videos` | `Optional[List[Video]]` | `None` | Video artifacts from the step |
| `audio` | `Optional[List[Audio]]` | `None` | Audio artifacts from the step |
| `response_audio` | `Optional[Audio]` | `None` | Audio response from the step |
| `step_response` | `Optional[StepOutput]` | `None` | Complete step execution result object |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### ConditionExecutionStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.condition_execution_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the condition step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the condition |
| `condition_result` | `Optional[bool]` | `None` | Result of the condition evaluation |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### ConditionExecutionCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.condition_execution_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the condition step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the condition |
| `condition_result` | `Optional[bool]` | `None` | Result of the condition evaluation |
| `executed_steps` | `Optional[int]` | `None` | Number of steps executed based on condition |
| `step_results` | `List[StepOutput]` | `[]` | Results from executed steps |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### ParallelExecutionStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.parallel_execution_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the parallel step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the parallel step |
| `parallel_step_count` | `Optional[int]` | `None` | Number of steps to execute in parallel |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### ParallelExecutionCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.parallel_execution_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the parallel step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the parallel step |
| `parallel_step_count` | `Optional[int]` | `None` | Number of steps executed in parallel |
| `step_results` | `List[StepOutput]` | `field(default_factory=list)` | Results from all parallel steps |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### LoopExecutionStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.loop_execution_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the loop step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the loop |
| `max_iterations` | `Optional[int]` | `None` | Maximum number of iterations allowed |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### LoopIterationStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.loop_iteration_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the loop step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the loop |
| `iteration` | `int` | `0` | Current iteration number |
| `max_iterations` | `Optional[int]` | `None` | Maximum number of iterations allowed |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### LoopIterationCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.loop_iteration_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the loop step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the loop |
| `iteration` | `int` | `0` | Current iteration number |
| `max_iterations` | `Optional[int]` | `None` | Maximum number of iterations allowed |
| `iteration_results` | `List[StepOutput]` | `[]` | Results from this iteration |
| `should_continue` | `bool` | `True` | Whether the loop should continue |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### LoopExecutionCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.loop_execution_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the loop step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the loop |
| `total_iterations` | `int` | `0` | Total number of iterations completed |
| `max_iterations` | `Optional[int]` | `None` | Maximum number of iterations allowed |
| `all_results` | `List[List[StepOutput]]` | `[]` | Results from all iterations |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### RouterExecutionStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.router_execution_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the router step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the router |
| `selected_steps` | `List[str]` | `field(default_factory=list)` | Names of steps selected by the router |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### RouterExecutionCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.router_execution_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the router step |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the router |
| `selected_steps` | `List[str]` | `field(default_factory=list)` | Names of steps that were selected |
| `executed_steps` | `Optional[int]` | `None` | Number of steps executed |
| `step_results` | `List[StepOutput]` | `field(default_factory=list)` | Results from executed steps |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### StepsExecutionStartedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.steps_execution_started.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the steps group |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the steps group |
| `steps_count` | `Optional[int]` | `None` | Number of steps in the group |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### StepsExecutionCompletedEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `WorkflowRunEvent.steps_execution_completed.value` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the steps group |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the steps group |
| `steps_count` | `Optional[int]` | `None` | Number of steps in the group |
| `executed_steps` | `Optional[int]` | `None` | Number of steps actually executed |
| `step_results` | `List[StepOutput]` | `field(default_factory=list)` | Results from all executed steps |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |

### StepOutputEvent Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `event` | `str` | `"StepOutput"` | Event type identifier |
| `step_name` | `Optional[str]` | `None` | Name of the step that produced output |
| `step_index` | `Optional[Union[int, tuple]]` | `None` | Index or position of the step |
| `step_output` | `Optional[StepOutput]` | `None` | Complete step execution result |
| *Inherits all fields from `BaseWorkflowRunOutputEvent`* |
| **Properties (read-only):** |
| `content` | `Optional[Union[str, Dict[str, Any], List[Any], BaseModel, Any]]` | - | Content from the step output |
| `images` | `Optional[List[Image]]` | - | Images from the step output |
| `videos` | `Optional[List[Video]]` | - | Videos from the step output |
| `audio` | `Optional[List[Audio]]` | - | Audio from the step output |
| `success` | `bool` | - | Whether the step succeeded |
| `error` | `Optional[str]` | - | Error message if step failed |
| `stop` | `bool` | - | Whether the step requested early termination |